﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace EntityModel
{
    /// <summary>
    /// 模块管理
    /// </summary>
    public class Module
    {
        /// <summary>
        /// 主键
        /// </summary>
        public long ModuleID { get; set; }
        /// <summary>
        /// 模块名称
        /// </summary>
        public string ModuleName { get; set; }
        /// <summary>
        /// 路径
        /// </summary>
        public string Href { get; set; }
        /// <summary>
        /// 图标路径
        /// </summary>
        public string iconCls { get; set; }
        /// <summary>
        /// 父
        /// </summary>
        public Module Parent { get; set; }
        /// <summary>      
        /// 父ID      
        /// </summary>        
        public Nullable<long> ParentId { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public Int32 Sort { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public String Remark { get; set; }
        /// <summary>
        /// 录入时间
        /// </summary>
        public DateTime CheckInTime { get; set; }
        /// <summary>
        /// 数据状态
        /// </summary>
        public bool DataState { get; set; }
        /// <summary>
        /// 子节点
        /// </summary>
        [ForeignKey("ParentId")]
        public virtual List<Module> Children { get; set; }

        public virtual List<SysAction> SysActions { get; set; }

    }
}
